package com.ruoyi.car.mapper;

import com.ruoyi.car.controller.admin.carinfo.vo.CarInfoDetailResp;
import com.ruoyi.car.controller.admin.carinfo.vo.CarInfoReq;
import com.ruoyi.car.controller.admin.carinfo.vo.CarInfoResp;
import com.ruoyi.car.entity.CarInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
* @author 11452
* @description 针对表【car_info(车辆信息)】的数据库操作Mapper
* @createDate 2023-06-08 09:37:18
* @Entity com.ruoyi.car.entity.CarInfo
*/
@Mapper
public interface CarInfoMapper extends BaseMapper<CarInfo> {

    /**
     * 分页查询
     * @param req
     * @return
     */
    List<CarInfoResp> search(@Param(value = "req") CarInfoReq req);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    CarInfoDetailResp findById(Long id);

    @Select(value = "select id from car_info")
    Set<Long> selectIds();
}




